"""
@release: fsray-api-alpha
@file: AreaService.py
@author: lingdubing
@desc: 操作区域行为的接口层
@character: utf-8
"""


from models.models import Area
from service.BaseService import BaseService
from config import settings
from sqlmodel import Session, select
from typing import Optional,List

class AreaService(BaseService[Area]):
    def __init__(self):
        super().__init__(Area)

    def get_area_by_id(self, area_id: int):
        statment = select(Area).where(Area.area_id == area_id)
        return self.session.exec(statment).first()

    def get_all_area(self):
        statment = select(Area).where(Area.area_id != 0)
        return self.session.exec(statment).all()








